﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["module"] != null)
        {
            string module = Request.QueryString["module"].ToString().Trim();
            switch (module)
            {
                case "1":  //Quản lý loại sản phẩm   
                    Content("ContentPlaceHolder1").Controls.Add(LoadControl("~/Admin/UserControl/QL_LoaiSanPham.ascx"));
                    break;
                case "2": //Quản lý sản phẩm
                    Content("ContentPlaceHolder1").Controls.Add(LoadControl("~/Admin/UserControl/QL_SanPham.ascx"));
                    break;
                case "3": //Quản lý tin tức
                    Content("ContentPlaceHolder1").Controls.Add(LoadControl("~/Admin/UserControl/QL_TinTuc.ascx"));
                    break;
                default:
                     Content("ContentPlaceHolder1").Controls.Add(LoadControl("~/Admin/UserControl/QL_SanPham.ascx"));
                    break;
            }
        }
        else
        {
            return;
        }
    }
    private Control Content(string id)
    {
        return Page.Master.FindControl(id);
    }

}